package tsj.ai.alibaba.data.analysis.service.vectorstore;

import org.springframework.ai.document.Document;
import tsj.ai.alibaba.data.analysis.common.request.AgentSearchRequest;
import tsj.ai.alibaba.data.analysis.common.request.SchemaInitRequest;

import java.util.List;
import java.util.Map;

/**
 * @author taoshujian
 * @version 1.0
 * @since 2025-11-14 11:31:02
 */
public interface AgentVectorStoreService {

    List<Document> findAllDocuments();

    /**
     * 查询某个Agent的文档 总入口
     */
    List<Document> search(AgentSearchRequest searchRequest);

    Boolean schema(String agentId, SchemaInitRequest schemaInitRequest) throws Exception;

    Boolean deleteDocumentsByVectorType(String agentId, String vectorType) throws Exception;

    Boolean deleteDocumentsByMetedata(String agentId, Map<String, Object> metadata) throws Exception;

    /**
     * Get documents for specified agent
     */
    List<Document> getDocumentsForAgent(String agentId, String query, String vectorType);

    boolean hasDocuments(String agentId);

    void addDocuments(String agentId, List<Document> documents);

    int estimateDocuments(String agentId);
}
